  finp$="picture.png":fout$=finp$+".txt":xed=256:yed=64
  setdisplay(xed,yed,32,1):paper(8^8-1):ink(0):pen(0):cls
  Loadimage(finp$,1):pasteicon(0,0,1):open fout$ for output as #1
for y2=0 to 7:for x2=0 to 31
       chidx=x2+(y2*32):a$="z$["+str$(chidx)+"]="+chr$(34)
  for y1=0 to 7:for x1=0 to 7 step 4:vtm=0
    for x0=0 to 3
       x=x1+x0+(x2*8):y=y1+(y2*8)
       u=1-(bitwiseand(point(x,y),128)\128)
       vtm=vtm+u*(2^(3-x0))
     next
       a$=a$+hex$(vtm)
   next:next
       a$=a$+chr$(34):print #1,a$
 next:next
   close #1

